package com.caiyouxi.boss;

import com.caiyouxi.system.mapper.SettingsMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.text.SimpleDateFormat;

@RestController
@RequestMapping("/autotask")
public class AutoTask{

    @Autowired
    private SettingsMapper settingsMapper;

    /**
     * 定时跑批查询，清零过期用户账户余额
     * @return
     */
//    @RequestMapping("/clean_account")
//    public void cleanFinanceAccount(){
//         System.out.println ("Scheduling Tasks Examples By Cron: The time is now " + dateFormat ().format (new Date ()));
//         SettingsBean select_setting = settingsMapper.select_setting("query_order_on_time");
//    }
    
    private SimpleDateFormat dateFormat(){
        return new SimpleDateFormat ("HH:mm:ss");
    }

}